﻿using System;

namespace KKSGameLibrary.Logic
{
    public class Card
    {
        public CardType CardType { set; get; }

        // west,north,east,south
        // one byte for each direction
        // 0 stands for "no castle wall"
        // 1 stands for "castle group 1"
        // 2 stands for "castle group 2"
        // 3 stands for "castle group 3"
        // 4 stands for "castle group 4"
        public int CastleData { set; get; }

        // west,north,east,south
        // one byte for each direction
        // 0 stands for "not road"
        // 1 stands for "road 1"
        // 2 stands for "road 2"
        // 3 stands for "road 3"
        // 4 stands for "road 4"
        public int RoadData { set; get; }

        public int RiverData { set; get; }

        public bool IsEqual(Card cardb)
        {
            return CardType == cardb.CardType
                && CastleData == cardb.CastleData
                && RoadData == cardb.RoadData
                && RiverData == cardb.RiverData;
        }

    }


    [Flags]
    public enum CardType
    {
        Empty=0,
        Castle=1,
        Road=2,
        Church=4,
        River=8
    }
}
